﻿#include "Myunordered_set.h"
#include <iostream>
#include"Myunordered_map.h"

void testconst(const Ysz::unordered_set<int>& s)
{

	auto it = s.begin();

	/*while (it != s.end())
	{
	
		cout << *it << endl;
		++it;
	}*/

	for (const auto& x:s)
	{

		cout << x << endl;
	}
}
void testconstmap(const Ysz::unordered_map<string, string>& dict)
{

	for (auto& x : dict)
	{
	
		cout << x.first << ":" << x.second << endl;
	}
}


int main()
{

	//Ysz::unordered_set<int> s;
	//int arr[] = { 19, 30, 5, 36, 13, 20, 21, 12 };
	//cout << s.empty() << endl;

	//s.insert(19);
	//cout << s.bucket_size(19)<< endl;

	//cout << s.empty() << endl;
	//s.insert(30);
	//s.insert(5);
	//s.insert(36);
	//s.insert(13);
	//s.insert(20);
	//s.insert(21);
	//s.insert(12);
	//cout << s.size() << endl;
	//cout << s.count(285) << endl;
	//testconst(s);
	//auto it = s.find(20);
	/*auto it = s.erase(30);
	cout << s.size() << endl;*/

	//auto it = s.begin();

	/*while (it != s.end())
	{
		
		cout << *it << endl;
		++it;
	}
	*/
	
	
	/*for (const auto& x : s)
	{

		cout << x << endl;
	}*/



	Ysz::unordered_map<string, string> dict;
	dict.insert({ "XXXY","印花集" });
	dict.insert({ "I","我" });
	dict.insert({ "gift","天赋" });
	dict.insert({ "you","你" });
	dict["god"];
	dict["find"] = "找到";
	dict["gift"] = "天赋,礼物";
	//dict.erase("you");
	//testconstmap(dict);
	for (auto& x:dict)
	{
		//x.second = '6';
		//dict[x.first] = "aaa";
		cout << x.first << ":" << x.second << endl;
	}
	return 0;
}